package com.baizhi.cmfz.controller;

import com.baizhi.cmfz.annotation.LogAnnotation;
import com.baizhi.cmfz.entiy.Menu;

import com.baizhi.cmfz.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import java.util.List;

@Controller
public class MenuController {

        @Autowired
    private MenuService service;

    @RequestMapping("getMenu")
    @ResponseBody
    @LogAnnotation("查看目录")
    public List<Menu> getMenu(){
        //System.out.println("获得menu");
        return service.getMenu();
    }
}
